var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/student_teacher');

var student_Schema = mongoose.Schema({
    name: String,
    studentNo: Number,
    classNo: Number,
    password: String
});

var teacher_Schema = mongoose.Schema({
    id: Number,
    name: String,
    password: String
});

var student = mongoose.model('students', student_Schema);
var teacher = mongoose.model('teachers', teacher_Schema);

module.exports = {
    student: student,
    teacher: teacher
};